Repository navigation
v0.60.21.0 fix(persistence): SIGTERM a stopped git child before SIGKILL so it can release index.lock - #5793
Merged
Conversation
…LL so it can release index.lock
|
😎 This pull request was merged. |
…hen the exit event is lost (Linux zombie check), so the grace period only bounds stubborn children
…term-grace; renumber to v0.60.21.0
garrytan
added a commit
that referenced
this pull request
Oct 1, 2026
harjothkhara
added a commit
to harjothkhara/gbrain
that referenced
this pull request
Oct 1, 2026
Merges master's SIGTERM-before-SIGKILL git-child fix (garrytan#5793) into this branch. Non-absorption confirmed: master's diff between 3e60b24..6fe4393 touches only src/core/brain-repo-durability.ts and test/bounded-child-exec.test.ts, not any file this PR's fix lives in. Version-lockstep files bumped from 0.60.20.1 to 0.60.21.1; derived artifacts (template repo, plugin tree) regenerated. Agent-Id: agent-1ce06382-5a83-4028-99b7-7d86c5e1ed00
harjothkhara
added a commit
to harjothkhara/gbrain
that referenced
this pull request
Oct 1, 2026
Merges master's SIGTERM-before-SIGKILL git-child fix (garrytan#5793) into this branch. Non-absorption confirmed: master's diff between 3e60b24..6fe4393 does not touch src/commands/doctor/bootstrap-checks.ts, src/core/pglite-lock.ts, src/core/bootstrap/uninstall.ts, or the export-surface goldens. Version-lockstep files bumped from 0.60.20.1 to 0.60.21.1; derived artifacts (template repo, plugin tree) regenerated. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes a regression in v0.60.16.0 (#5787).
execFileBoundedstopped a child at its deadline, or on abort, with SIGKILL. Before #5787,execFilesent SIGTERM. WhenPersistenceConsumer.stop()aborts the effects signal during agit addorgit commit, a SIGKILLed git leaves.git/index.lockbehind. Every later git call in that worktree then exits 128, which surfaces asgit_unavailableand counts toward parking. GBRA-25 found it through fix wave 4'sw5-persistence-postgres"a healthy scan and contention never park" failure.Fix.
execFileBoundedsends SIGTERM and settles as soon as the child has exited./proc/<pid>/statevery 25 ms and treats a zombie as exited.Why the zombie check matters. The first version of this PR waited out the full grace period whenever the exit event was lost. That pushed
test/e2e/embedding-recovery-parity.test.tspast the 180 s per-file cap on GitHub CI. Local timings on a single Postgres container:All three runs passed all 155 tests.
Tests.
test/bounded-child-exec.test.tsgains two cases. In one, a child holding a lock file removes it on SIGTERM; on the old code the lock is left behind. In the other, a child that ignores SIGTERM is still stopped within the bound. The existing lost-event, exit-code, abort and deadline cases pass.persistence-effect-parking,persistence-effect-retry*,persistence-effectsandbun run verifyalso pass.Versioned v0.60.21.0 (next free after fix wave 4, v0.60.20.0).